package com.ysx.student.zhangqingrong.com.ysx.day4;

import java.util.Scanner;

/**
 * @author 张青荣
 * <p>
 * 求1到100之间相加的和
 */
public class Test2 {
    public static void main(String[] args) {


        getSum(0);
    }

    private static void getSum(int sum) {
        //
        for (int i = 1; i <= 100; i++) {
            sum = sum + i;


        }
        System.out.println(sum);


    }


}
